package com.jsbj.user.entities;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 系统租户表
 * </p>
 *
 * @author jsbj
 * @since 2022-02-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysTenant对象", description="系统租户表")
public class SysTenant implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "租户ID")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "租户编号")
    private String tenantCode;

    @ApiModelProperty(value = "租户名字")
    private String tenantName;

    @ApiModelProperty(value = "父租户编号")
    private String parentTenantCode;

    @ApiModelProperty(value = "是否支持手机号登录")
    private String enableMobileAccount;

    @ApiModelProperty(value = "租户超管账号")
    private String tenantSuperAccount;

    @ApiModelProperty(value = "租户类型(存放字典key，具体名称看字典表)")
    private String tenantTypeKey;

    @ApiModelProperty(value = "租户类型（存放字典value，具体名称看字典表）")
    private String tenantTypeValue;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "是否可用  0可用 1不可用")
    @TableField(fill = FieldFill.INSERT)
    private Integer disabled;

    @ApiModelProperty(value = "创建人用户ID")
    private String createrId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    @ApiModelProperty(value = "最后变更人用户ID")
    private String updateId;

    @ApiModelProperty(value = "最后变更时间")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    private List<SysTenant> child;

    @ApiModelProperty(value = "删除按钮")
    @TableField(exist = false)
    private boolean del;

    @ApiModelProperty(value = "创建时间")
    @TableField(exist = false)
    private String updateTimeStr;

    @ApiModelProperty(value = "项目类型额外参数")
    @TableField(exist = false)
    private SysProject sysProject;

    @ApiModelProperty(value = "租户类型描述")
    @TableField(exist = false)
    private String tenantTypeDesc;

    @ApiModelProperty(value = "租户超管账号描述")
    @TableField(exist = false)
    private String tenantSuperAccountDesc;

    @ApiModelProperty(value = "创建人名称")
    @TableField(exist = false)
    private String updateName;

    @ApiModelProperty(value = "包含系统，系统编码用逗号隔开")
    @TableField(exist = false)
    private String includeSystem;

    @ApiModelProperty(value = "项目id")
    @TableField(exist = false)
    private String proId;


}
